package com.tal.user.controller;

import com.tal.user.dto.User;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import org.yaml.snakeyaml.util.ArrayUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author max
 * @version 1.0.0
 * @ClassName UserController.java
 * @Description TODO
 * @createTime 2021年03月28日 22:52:00
 */

@RestController
public class UserController {

    @GetMapping("/friends/{userId}")
    public List<User> getFriends(@PathVariable(value = "userId") String userId) {
        System.out.println("userId: " + userId);
        List<User> users = new ArrayList<>(2);
        users.add(new User("小三", 25));
        users.add(new User("王五", 30));
        return users;
    }
}
